import { request } from '../request';

/** get list */
export function articleList(params: Api.SystemManage.ArticleSearchParams) {
  return request<Api.SystemManage.ArticleList>({
    url: '/article/list',
    method: 'post',
    data: params
  });
}

/** save */
export function articleSave(params?: Api.SystemManage.ArticleSaveParams) {
  return request<boolean>({
    url: '/article/add',
    method: 'post',
    data: params
  });
}

/** update */
export function articleUpdate(params?: Api.SystemManage.ArticleUpdateParams) {
  return request<boolean>({
    url: '/article/update',
    method: 'post',
    data: params
  });
}

/** get */
export function articleGet(params: { id: string }) {
  return request<Api.SystemManage.Article>({
    url: '/article/get',
    method: 'post',
    data: params
  });
}

/** del */
export function articleDel(params: { id: string }) {
  return request<boolean>({
    url: '/article/del',
    method: 'post',
    data: params
  });
}

/** delBatch */
export function articleDelBatch(params: { ids: Array<string> }) {
  return request<boolean>({
    url: '/article/delBatch',
    method: 'post',
    data: params
  });
}
